package com.niit.session13.homework;

import java.util.Scanner;

public class Business {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int day = sc.nextInt();
		int week = day/7;
		int money = week*500;
		if(day%7>0) {
			money+=500;
		}
		System.out.println(money);
	}

}
